package com.study.scala.oop

object University {

  private var studentNo = 0;

  def newStudentNo(): Int = {
    studentNo += 1;
    studentNo;
  }

}

object Main {
  def main(args: Array[String]): Unit = {
    println(University.newStudentNo())
    println(University.newStudentNo())
    println(University.newStudentNo())
  }
}